/* GLWindow.h
 *
 * --
 * Copyright (c) 2012, Christophe Huriaux
 * Distributed under the terms of the MIT license.
 * http://www.opensource.org/licenses/mit-license.php
 * --
 */

#ifndef GLWINDOW_H_
#define GLWINDOW_H_

#include <graphics/SDLWindow.h>
#include <graphics/GLScene.h>
#include <GL/gl.h>
#include <GL/glu.h>

class GLWindow : public SDLWindow
{
	GLScene* glScene;

public:
	GLWindow(const char* title, unsigned int width, unsigned int height,
			unsigned int bpp, bool fullscreen);
	GLWindow(const char* title, unsigned int width, unsigned int height,
			unsigned int bpp);
	GLWindow(const char* title, unsigned int width, unsigned int height);
	~GLWindow();

	void setScene(GLScene* scene) { glScene = scene; };
	GLScene* scene() { return glScene; };


protected:
	int init();
	int setVideoMode();
	int updateVideoMode();
	void callbackLoop();
	void atLaunch();
};

#endif /* GLWINDOW_H_ */
